<ion-header>
  <ion-navbar>
    <ion-title>打开外部链接</ion-title>
    <ion-buttons>
      <button ion-button (click)="dismiss()">
        <ion-icon name="arrow-back"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>
</ion-header>
<ion-content >
  <ion-segment [(ngModel)]="chooseType" color="primary" (ionChange)="segmentChanged($event)">
    <ion-segment-button value="handle">
      所需插件
    </ion-segment-button>
    <ion-segment-button value="test">
      真机调试
    </ion-segment-button>
  </ion-segment>
  <div *ngIf="chooseType=='handle'">
    <ion-list>
    <ion-item-sliding *ngFor="let item of showArr">
      <ion-item>
          {{item.text}}
      </ion-item>
      <ion-item-options side="right">
          <button ion-button> {{item.tips}}</button>
        </ion-item-options>
    </ion-item-sliding>
    </ion-list>
    <textarea disabled rows="10">
      import { PincodeController } from  'ionic2-pincode-input/dist/pincode'
      constructor(public pincodeCtrl: PincodeController) {}
      openPinCode():any{
        let pinCode =  this.pincodeCtrl.create({
          title:'Pincode'
        });
        pinCode.present();
        pinCode.onDidDismiss( (code,status) => {
          if(status === 'done'){
            // 输入完成
            this.code = code;
          }else if (status === 'forgot'){
            // 忘记密码
          }
        })
    
      }
    </textarea>
  </div>
  <div *ngIf="chooseType=='test'">
      <button ion-button full (click)="openCode()">打开键盘</button>
  </div>
</ion-content>
